package in.muton.edushare.validators;

import org.apache.wicket.validation.IValidatable;
import org.apache.wicket.validation.validator.AbstractValidator;

import com.edushare.common.util.StringUtil;

public class PositiveNumberValidator extends AbstractValidator<String> {

	private static final long serialVersionUID = 5964149430473792328L;

	@Override
	protected void onValidate(IValidatable<String> validatable) {
		String value = validatable.getValue();
		if(!StringUtil.isValid(value))
			error(validatable);
		else{
			long l = Long.parseLong(value);
		}
	}

}
